<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/menu" prefix="menu"%>
<nav class="navbar-default navbar-static-side" role="navigation">
	<div class="sidebar-collapse">
		<ul class="nav" id="side-menu">
			<li class="nav-header">
				<div class="dropdown profile-element">
					<span> 
						<s:if test="#session.user.imageFile==null">
							<img alt="image" class="img-circle" src="../img/hou2.jpg" style="width: 45%;"/>
						</s:if>
						<s:else>
							<img alt="image" class="img-circle" src="../upload/${session.user.imageFile }" style="width: 45%;"/>
						</s:else>
					</span> 
					<a data-toggle="dropdown" class="dropdown-toggle" href="index.html#"> 
						<span class="clear"> 
							<span class="block m-t-xs"> 
								<strong class="font-bold">${session.user.nickname }</strong>
							</span> 
							<span class="text-muted text-xs block"> <b class="caret" style="margin-left: 46%;margin-top: -6%;"></b></span>
						</span>
					</a>
					<ul class="dropdown-menu animated fadeInRight m-t-xs">
						<li><a href="#" onClick="ajaxContent('getUserById?userID=${session.user.userID}')"><s:text name="index.menu.updateUserMsg"/></a></li>
						<li><a href="#" onClick="ajaxContent('getPassword?userID=${session.user.userID}')"><s:text name="index.menu.updatePwd"/></a></li>
						<li class="divider"></li>
						<li><a href="logout?userID=${session.user.userID }"><s:text name="index.head.logout"/></a></li>
					</ul>
				</div>
				<div class="logo-element">
					<img alt="image" class="img-circle" src="../upload/${session.user.imageFile }" style="width: 70%;"/>
				</div>
			</li>
			<s:iterator value="#session.menus">
			<li>
				<a href="#" id="users">
					<i class="${imageURL }"></i>
					<s:if test="#session.language == 'zh_CN'">
						<span class="nav-label">${menu_zh_name }</span>
					</s:if>
					<s:else>
						<span class="nav-label">${menu_en_name }</span>
					</s:else>
					<span class="fa arrow"></span>
				</a>
				<menu:menu menuID="${menuID }" language="${language }"/>
			</li>
			</s:iterator>
		</ul>
	</div>
</nav>
<!-- sky start -->
<script>
	$(function() {
		$(".nav-second-level").find("li").children("a").click(function() {
			$(".nav-second-level").children("li").removeClass("active");
			$(this).parent("li").toggleClass("active");
		});

	});
</script>
<!-- sky end -->